<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 核心包 -->
    <script src="../react18/react.development.js"></script>
    <!-- 操作Dom的包 -->
    <script src="../react18/react-dom.development.js"></script>
    <!-- 引入Babel的包,用来解析JSX语法为JS语法 -->
    <script src="../react18/babel.min.js"></script>
    <style>
        .outer {
            width: 400px;
            height: 300px;
            background-color: pink;
        }
    </style>
</head>

<body>
    <div id="app"></div>
    <!-- 如果需要bable对当前的script内部的jsx编译,则需要设置script的type属性 -->
    <script type="text/babel">
        /*  // 使用jsx方法创建虚拟DOM
        const vDOM=(
            <div className="outer">
                <h1>jsx</h1>
                <p>jsx贼方便</p>
            </div>   
        );

// 创建容器并渲染虚拟DOM

ReactDOM.createRoot(document.getElementById("app")).render(vDOM)


 */




/* const vdom=(
    <div className="outer">
    <h1>jsx</h1>
    <p>jsx贼方便</p>
    </div>
)
ReactDOM.createRoot(document.getElementById("app")).render(vdom)

 */

/* const vdom=(
    <div className="outer">
        <h1>今天天气</h1>
        <p>真不错</p>
        </div>
)
ReactDOM.createRoot(document.getElementById("app")).render(vdom) */

const vdom=(
    <div className="outer">
        <h1>今天天气</h1>
        <p>真不错</p>
        </div>
)

ReactDOM.createRoot(document.getElementById("app")).render(vdom)


    </script>
</body>

</html>